/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mobcatwebappgeneration;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import persistencia.controller.jpa.JdbcController;

/**
 *
 * @author Novo usuário
 */
public class StartApp {

    public static void main(String[] args) {

        String[] projs = new String[]{"MobCat_off_lwuit", "MobCat_off_j2me"};

        for (int i = 0; i < projs.length; i++) {
            String proj = projs[i];

           // BuildMobile.getInstance().execute(JdbcController.getInstance().getSchema());
            try {
                String line;
                Process p = Runtime.getRuntime().exec("build.bat " + proj);

                BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
                while ((line = input.readLine()) != null) {
                    System.out.println(line);
                }
                input.close();

            } catch (IOException e) {
                e.printStackTrace();
            }


        }

    }
}
